package com.source.lightfowl.basedata.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.Date;


/**
 * @Author: cxy
 * @Description: 屠宰市场
 */
@Entity
@Component
@Data
@Table(name = "slaughter_house")
public class SlaughterHouse {

    @GeneratedValue(strategy= GenerationType.IDENTITY)
    @Id
    private int id;

    private String name; //名称
    private String userId; //负责人
    private String longitude;//经度
    private String latitude; //维度
    private String creatBy; //创建者
//    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT-8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createDate;//创建时间

    private String province; //省
    private String city; //市
    private String district; //区
    private String address; //详细地址
    private String contacts; //联系人
//    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT-8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date establishDate; //成立日期
    private String marketPictures; //市场照片
    private String marketIntroduction; //市场简介
    @ApiModelProperty(hidden = true)
    private Integer state; //状态（0已删1正常2发布待审核3删除待审核）
}
